		var UpdateLoop = function(){
			this.running;
			this.time = 0;
			this.tpf = 0;						
			
			this.updateObjects = [];
			this.addUpdateObject = function(object){
			this.updateObjects.push(object);
			}
			this.removeUpdateObject = function(object){
			this.updateObjects.remove(object);
			}
			this.start = function(){
			this.running = true;
			this.time = new Date();
			this.update();
			}
			this.stop = function(){
			this.running = false;
			}
			this.update = function (){
			
			var tempTime = new Date();
			this.tpf = (tempTime-this.time)/1000;
			this.time = tempTime;
			for(var i=0; i<this.updateObjects.length; i++){
					if(this.running == true)
					{
					this.updateObjects[i].update(this.tpf);
					setTimeout(function(thisObj) { thisObj.update(); }, 0, this);
					}
				}
			}
			
		}